home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
ImageCodec.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
12KB
|
355 lines
;
; File: ImageCodec.a
;
; Contains: QuickTime Interfaces.
;
; Version: Technology: QuickTime 2.1
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__IMAGECODEC__') = 'UNDEFINED' THEN
__IMAGECODEC__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
include 'Quickdraw.a'
ENDIF
IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
include 'QDOffscreen.a'
ENDIF
IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
include 'Windows.a'
ENDIF
IF &TYPE('__IMAGECOMPRESSION__') = 'UNDEFINED' THEN
include 'ImageCompression.a'
ENDIF
IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
include 'Components.a'
ENDIF
IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
include 'Movies.a'
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
; codec component selectors
codecGetCodecInfo EQU $00
codecGetCompressionTime EQU $01
codecGetMaxCompressionSize EQU $02
codecPreCompress EQU $03
codecBandCompress EQU $04
codecPreDecompress EQU $05
codecBandDecompress EQU $06
codecCDSequenceBusy EQU $07
codecGetCompressedImageSize EQU $08
codecGetSimilarity EQU $09
codecTrimImage EQU $0A
codecRequestSettings EQU $0B
codecGetSettings EQU $0C
codecSetSettings EQU $0D
codecCDSequenceFlush EQU $0E
codecSetTimeCode EQU $0F
codecIsImageDescriptionEquivalent EQU $10
codecNewMemory EQU $11
codecDisposeMemory EQU $12
codecHitTestData EQU $13
; codec selectors 0-127 are reserved by Apple
; codec selectors 128-191 are subtype specific
; codec selectors 192-255 are vendor specific
; codec selectors 256-32767 are available for general use
; negative selectors are reserved by the Component Manager
; codec capabilities flags
codecCanScale EQU $00000001
codecCanMask EQU $00000002
codecCanMatte EQU $00000004
codecCanTransform EQU $00000008
codecCanTransferMode EQU $00000010
codecCanCopyPrev EQU $00000020
codecCanSpool EQU $00000040
codecCanClipVertical EQU $00000080
codecCanClipRectangular EQU $00000100
codecCanRemapColor EQU $00000200
codecCanFastDither EQU $00000400
codecCanSrcExtract EQU $00000800
codecCanCopyPrevComp EQU $00001000
codecCanAsync EQU $00002000
codecCanMakeMask EQU $00004000
codecCanShift EQU $00008000
codecCanAsyncWhen EQU $00010000
codecCanShieldCursor EQU $00020000
codecCanManagePrevBuffer EQU $00040000
codecHasVolatileBuffer EQU $00080000
codecWantsRegionMask EQU $00100000
CodecCapabilities RECORD 0
flags ds.l 1 ; offset: $0 (0)
wantedPixelSize ds.w 1 ; offset: $4 (4)
extendWidth ds.w 1 ; offset: $6 (6)
extendHeight ds.w 1 ; offset: $8 (8)
bandMin ds.w 1 ; offset: $A (10)
bandInc ds.w 1 ; offset: $C (12)
pad ds.w 1 ; offset: $E (14)
time ds.l 1 ; offset: $10 (16)
sizeof EQU * ; size: $14 (20)
ENDR
; codec condition flags
codecConditionFirstBand EQU $00000001
codecConditionLastBand EQU $00000002
codecConditionFirstFrame EQU $00000004
codecConditionNewDepth EQU $00000008
codecConditionNewTransform EQU $00000010
codecConditionNewSrcRect EQU $00000020
codecConditionNewMask EQU $00000040
codecConditionNewMatte EQU $00000080
codecConditionNewTransferMode EQU $00000100
codecConditionNewClut EQU $00000200
codecConditionNewAccuracy EQU $00000400
codecConditionNewDestination EQU $00000800
codecConditionFirstScreen EQU $00001000
codecConditionDoCursor EQU $00002000
codecConditionCatchUpDiff EQU $00004000
codecConditionMaskMayBeChanged EQU $00008000
codecConditionCodecChangedMask EQU $80000000
codecInfoResourceType EQU 'cdci' ; codec info resource type
codecInterfaceVersion EQU 2 ; high word returned in component GetVersion
CDSequenceDataSource RECORD 0
recordSize ds.l 1 ; offset: $0 (0)
next ds.l 1 ; offset: $4 (4)
seqID ds.l 1 ; offset: $8 (8)
sourceID ds.l 1 ; offset: $C (12)
sourceType ds.l 1 ; offset: $10 (16)
sourceInputNumber ds.l 1 ; offset: $14 (20)
dataPtr ds.l 1 ; offset: $18 (24)
dataDescription ds.l 1 ; offset: $1C (28)
changeSeed ds.l 1 ; offset: $20 (32)
transferProc ds.l 1 ; offset: $24 (36)
refCon ds.l 1 ; offset: $28 (40)
sizeof EQU * ; size: $2C (44)
ENDR
; typedef struct CDSequenceDataSource * CDSequenceDataSourcePtr
CodecCompressParams RECORD 0
sequenceID ds.l 1 ; offset: $0 (0) ; precompress,bandcompress
imageDescription ds.l 1 ; offset: $4 (4) ; precompress,bandcompress
data ds.l 1 ; offset: $8 (8)
bufferSize ds.l 1 ; offset: $C (12)
frameNumber ds.l 1 ; offset: $10 (16)
startLine ds.l 1 ; offset: $14 (20)
stopLine ds.l 1 ; offset: $18 (24)
conditionFlags ds.l 1 ; offset: $1C (28)
callerFlags ds.w 1 ; offset: $20 (32)
capabilities ds.l 1 ; offset: $22 (34) ; precompress,bandcompress
progressProcRecord ds ICMProgressProcRecord ; offset: $26 (38)
completionProcRecord ds ICMCompletionProcRecord ; offset: $2E (46)
flushProcRecord ds ICMFlushProcRecord ; offset: $36 (54)
srcPixMap ds PixMap ; offset: $3E (62) ; precompress,bandcompress
prevPixMap ds PixMap ; offset: $70 (112)
spatialQuality ds.l 1 ; offset: $A2 (162)
temporalQuality ds.l 1 ; offset: $A6 (166)
similarity ds.l 1 ; offset: $AA (170)
dataRateParams ds.l 1 ; offset: $AE (174)
reserved ds.l 1 ; offset: $B2 (178)
; The following fields only exist for QuickTime 2.1 and greater
majorSourceChangeSeed ds.w 1 ; offset: $B6 (182)
minorSourceChangeSeed ds.w 1 ; offset: $B8 (184)
sourceData ds.l 1 ; offset: $BA (186)
sizeof EQU * ; size: $BE (190)
ENDR
CodecDecompressParams RECORD 0
sequenceID ds.l 1 ; offset: $0 (0) ; predecompress,banddecompress
imageDescription ds.l 1 ; offset: $4 (4) ; predecompress,banddecompress
data ds.l 1 ; offset: $8 (8)
bufferSize ds.l 1 ; offset: $C (12)
frameNumber ds.l 1 ; offset: $10 (16)
startLine ds.l 1 ; offset: $14 (20)
stopLine ds.l 1 ; offset: $18 (24)
conditionFlags ds.l 1 ; offset: $1C (28)
callerFlags ds.w 1 ; offset: $20 (32)
capabilities ds.l 1 ; offset: $22 (34) ; predecompress,banddecompress
progressProcRecord ds ICMProgressProcRecord ; offset: $26 (38)
completionProcRecord ds ICMCompletionProcRecord ; offset: $2E (46)
dataProcRecord ds ICMDataProcRecord ; offset: $36 (54)
port ds.l 1 ; offset: $3E (62) ; predecompress,banddecompress
dstPixMap ds PixMap ; offset: $42 (66) ; predecompress,banddecompress
maskBits ds.l 1 ; offset: $74 (116)
mattePixMap ds.l 1 ; offset: $78 (120)
srcRect ds Rect ; offset: $7C (124) ; predecompress,banddecompress
matrix ds.l 1 ; offset: $84 (132) ; predecompress,banddecompress
accuracy ds.l 1 ; offset: $88 (136) ; predecompress,banddecompress
transferMode ds.w 1 ; offset: $8C (140) ; predecompress,banddecompress
frameTime ds.l 1 ; offset: $8E (142) ; banddecompress
reserved ds.l 1 ; offset: $92 (146) <-- really an array of length one
; The following fields only exist for QuickTime 2.0 and greater
matrixFlags ds.b 1 ; offset: $96 (150) ; high bit set if 2x resize
matrixType ds.b 1 ; offset: $97 (151)
dstRect ds Rect ; offset: $98 (152) ; only valid for simple transforms
; The following fields only exist for QuickTime 2.1 and greater
majorSourceChangeSeed ds.w 1 ; offset: $A0 (160)
minorSourceChangeSeed ds.w 1 ; offset: $A2 (162)
sourceData ds.l 1 ; offset: $A4 (164)
maskRegion ds.l 1 ; offset: $A8 (168)
sizeof EQU * ; size: $AC (172)
ENDR
matrixFlagScale2x EQU $00000080
matrixFlagScale1x EQU $00000040
matrixFlagScaleHalf EQU $00000020
;
; pascal ComponentResult CDGetCodecInfo(Handle storage, CodecInfo *info)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDGetCodecInfo
ENDIF
;
; pascal ComponentResult CDGetCompressionTime(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ *spatialQuality, CodecQ *temporalQuality, unsigned long *time)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDGetCompressionTime
ENDIF
;
; pascal ComponentResult CDGetMaxCompressionSize(Handle storage, PixMapHandle src, const Rect *srcRect, short depth, CodecQ quality, long *size)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDGetMaxCompressionSize
ENDIF
;
; pascal ComponentResult CDPreCompress(Handle storage, CodecCompressParams *params)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDPreCompress
ENDIF
;
; pascal ComponentResult CDBandCompress(Handle storage, CodecCompressParams *params)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDBandCompress
ENDIF
;
; pascal ComponentResult CDPreDecompress(Handle storage, CodecDecompressParams *params)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDPreDecompress
ENDIF
;
; pascal ComponentResult CDBandDecompress(Handle storage, CodecDecompressParams *params)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDBandDecompress
ENDIF
;
; pascal ComponentResult CDCodecBusy(Handle storage, ImageSequence seq)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDCodecBusy
ENDIF
;
; pascal ComponentResult CDGetCompressedImageSize(Handle storage, ImageDescriptionHandle desc, Ptr data, long bufferSize, ICMDataProcRecordPtr dataProc, long *dataSize)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDGetCompressedImageSize
ENDIF
;
; pascal ComponentResult CDGetSimilarity(Handle storage, PixMapHandle src, const Rect *srcRect, ImageDescriptionHandle desc, Ptr data, Fixed *similarity)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDGetSimilarity
ENDIF
;
; pascal ComponentResult CDTrimImage(Handle storage, ImageDescriptionHandle Desc, Ptr inData, long inBufferSize, ICMDataProcRecordPtr dataProc, Ptr outData, long outBufferSize, ICMFlushProcRecordPtr flushProc, Rect *trimRect, ICMProgressProcRecordPtr progressProc)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDTrimImage
ENDIF
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
;
; pascal ComponentResult CDRequestSettings(Handle storage, Handle settings, Rect *rp, ModalFilterUPP filterProc)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDRequestSettings
ENDIF
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE THEN
;
; pascal ComponentResult CDGetSettings(Handle storage, Handle settings)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDGetSettings
ENDIF
;
; pascal ComponentResult CDSetSettings(Handle storage, Handle settings)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDSetSettings
ENDIF
;
; pascal ComponentResult CDCodecFlush(Handle storage)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDCodecFlush
ENDIF
;
; pascal ComponentResult CDCodecSetTimeCode(Handle storage, void *timeCodeFormat, void *timeCodeTime)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDCodecSetTimeCode
ENDIF
;
; pascal ComponentResult CDCodecIsImageDescriptionEquivalent(Handle storage, ImageDescriptionHandle newDesc, Boolean *equivalent)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDCodecIsImageDescriptionEquivalent
ENDIF
;
; pascal ComponentResult CDCodecNewMemory(Handle storage, Ptr *data, Size dataSize, long dataUse, ICMMemoryDisposedUPP memoryGoneProc, void *refCon)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDCodecNewMemory
ENDIF
;
; pascal ComponentResult CDCodecDisposeMemory(Handle storage, Ptr data)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDCodecDisposeMemory
ENDIF
;
; pascal ComponentResult CDCodecHitTestData(Handle storage, ImageDescriptionHandle desc, void *data, Size dataSize, Point where, Boolean *hit)
;
IF GENERATINGCFM THEN
IMPORT_CFM_FUNCTION CDCodecHitTestData
ENDIF
ENDIF
ENDIF ; __IMAGECODEC__